-
Notifications
You must be signed in to change notification settings - Fork 226
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use MapDatastore for provider backend tests instead of leveldb #896
Conversation
d064e82
to
985b12c
Compare
@@ -71,23 +70,13 @@ func TestProvidersBackend_GarbageCollection(t *testing.T) { | |||
// advance clock half the validity time and check if record is still there | |||
clk.Add(cfg.ProvideValidity / 2) | |||
|
|||
// sync datastore to have all put/deletes visible | |||
err = b.datastore.Sync(ctx, ds.NewKey("/")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't have an effect anyway: https://github.com/ipfs/go-ds-leveldb/blob/8175c02d2a9107dd73b1cdeb315ae6fe7557e86a/datastore.go#L94
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
syncWrites was set to true in the initializer: https://github.com/ipfs/go-ds-leveldb/blob/8175c02d2a9107dd73b1cdeb315ae6fe7557e86a/datastore.go#L62
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we were filling the read cache? https://github.com/syndtr/goleveldb/blob/126854af5e6d8295ef8e8bee3040dd8380ae72e8/leveldb/opt/options.go#L702
* v2: upgrade to go1.21 * Add uci config * Use newer uci actions * Use v2 working directory in actions * Set go-version input in actions * Set go-version input in actions * Use go 1.20.8 in actions * Use go 1.21.1 and relative working directory * Try default working directory on job * Remove uci.yaml which is not supported yet * Try default working directory on job * Try default working directory as input * Restore uci.yaml * Restore uci.yaml * Use modified go-check * Use modified go-test * Fix go-test * Fix go-test * Fix go-test * Restore libp2p 0.30.0 * go mod tidy * Remove nil error return from DefaultConfig * use mock clock for IPNS record generation (#894) * Use MapDatastore for provider backend tests instead of leveldb (#896) * revert some merge residuals * style: minor coding clean up (#898) * remove superfluous type conversion * add tiny example test * unexport type conversion helpers * Target go language version 1.20 and add 1.20.8 to build matrix * Target go language version 1.20 and add 1.20.8 to build matrix * WIP --------- Co-authored-by: Dennis Trautwein <git@dtrautwein.eu>
leveldb synchronization seems to behave differenlty on Windows vs. Linux/MacOS which lead to failing tests.